package com.sundablog.controller.systemsetup.logSetting;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sundablog.result.LayUiResult;
import com.sundablog.service.systemsetup.logSetting.LogService;

@Controller
@RequestMapping("/systemsetup/LogSetting")
public class LogController {
	
	@Autowired
	private LogService logService;
	
	/**
	 * 日志界面显示
	 * @Title: showIndex   
	 * @Description: TODO(这里用一句话描述这个方法的作用)   
	 * @param: @return      
	 * @return: String      
	 * @throws
	 */
	@RequiresPermissions("systemsetup_LogSetting_index")
	@RequestMapping("/index")
	public String showIndex() {
		return "/systemsetup/LogSetting/index";
	}
	
	/**
	 * 分页查询
	 * @Title: findPagingQuery   
	 * @Description: TODO(这里用一句话描述这个方法的作用)   
	 * @param: @param page
	 * @param: @param limit
	 * @param: @return      
	 * @return: LayUiResult      
	 * @throws
	 */
	@RequiresPermissions("systemsetup_LogSetting_findPagingQuery")
	@RequestMapping("/findPagingQuery")
	@ResponseBody
	public LayUiResult findPagingQuery(@RequestParam(value="page", defaultValue="1") int page,@RequestParam(value="limit", defaultValue="10") int limit) {
		LayUiResult layUiResult = logService.findPagingQuery(page, limit);
		return layUiResult;
	}
	
}
